<!DOCTYPE html>

<html lang="en">
<head>
    <!-- The jQuery library is a prerequisite for all jqSuite products -->
    <script type="text/ecmascript" src="../../../js/jquery.min.js"></script> 
    <!-- We support more than 40 localizations -->
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-en.js"></script>
    <!-- This is the Javascript file of jqGrid -->   
    <script type="text/ecmascript" src="../../../js/trirand/jquery.jqGrid.min.js"></script>
    <!-- A link to a Boostrap  and jqGrid Bootstrap CSS siles-->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> 
    <link rel="stylesheet" type="text/css" media="screen" href="../../../css/trirand/ui.jqgrid-bootstrap.css" />
	<script>
		$.jgrid.defaults.width = 780;
		$.jgrid.defaults.responsive = true;
		$.jgrid.defaults.styleUI = 'Bootstrap';
	</script>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <!-- We support more than 40 localizations -->
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-en.js"></script>
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-de.js"></script>
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-fr.js"></script>
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-es.js"></script>
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-pt.js"></script>
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-ar.js"></script>
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-cn.js"></script>
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-kr.js"></script>
    <meta charset="utf-8" />
    <title>jqGrid Loading Data - Localization</title>
</head>
<body>

    <p style="margin-left:18px; font-family: Tahoma">Select a language to see the grid localized in it (<b>we support more than 40 localizations</b>) Note that the change is dynamically without reloading the page
        <br/><input type="radio" name="lang" onclick="navigateToLang('en')" checked="checked">English&nbsp;&nbsp;
        <input type="radio" name="lang" onclick="navigateToLang('de')">German&nbsp;&nbsp;
        <input type="radio" name="lang" onclick="navigateToLang('fr')">French&nbsp;&nbsp;
        <input type="radio" name="lang" onclick="navigateToLang('es')">Spanish
        <input type="radio" name="lang" onclick="navigateToLang('pt')">Portuguese&nbsp;&nbsp;
        <input type="radio" name="lang" onclick="navigateToLang('ar')">Arabic&nbsp;&nbsp;
        <input type="radio" name="lang" onclick="navigateToLang('cn')">Chinese&nbsp;&nbsp;
        <input type="radio" name="lang" onclick="navigateToLang('kr')">Korean
  </p>
<div style="margin-left:20px">
    <table id="jqGrid"></table>
    <div id="jqGridPager"></div>
</div>
    <script type="text/javascript"> 
    
        $(document).ready(function () {
            $("#jqGrid").jqGrid({
                url: 'data.json',
                datatype: "json",
                colModel: [
                    { name: 'CategoryName', width: 75 },
                    { name: 'ProductName', width: 90 },
                    { name: 'Country', width: 100 },
                    { name: 'Price', width: 80 },
                    { name: 'Quantity', width: 80 }                   
                ],
				loadonce: true,
				viewrecords: true,
                width: 780,
                height: 200,
                rowNum: 15,
                pager: "#jqGridPager"
            });
        });

        function navigateToLang(lng) {
            $.jgrid.setRegional('jqGrid',{regional: lng});
        }

    </script>

    <!-- This code is related to code tabs -->
    <br />
    <span style="margin-left:18px; font-family: Tahoma">Click on the Tabs below the see the relevant code for the example:</span>
    <br /><br />
    <div id="codetabs" style="width:700px; height: 400px; font-size:65%;"></div>
     
    <script type="text/ecmascript" src="../../../js/prettify/prettify.js"></script>
    <link rel="stylesheet" href="../../../css/prettify.css" />
        <script type="text/ecmascript" src="../../../js/codetabs-b.js"></script> 
    
    <script type="text/javascript">

        var tabData =
            [
                { name: "HTML", url: "index.html", lang: "lang-html" },
                { name: "Data.JSON", url: "data.json", lang: "lang-json" },
				{ name: "Description", url: "description.html", lang: "lang-html" }
            ];

        codeTabs(tabData);

    </script>
    <!-- End of code related to code tabs -->
</body>
</html>